package cn.tedu.seckill.consume;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class MyConsumer {
    /*
       实现消费逻辑的api方法,方法的参数,就是接受的消息对象
     */
    @RabbitListener(queues = {"direct_q2"})
    public void consume(String msg){
        System.out.println("消费端接受到消息:"+msg);
    }
}
